/*
 * @Author: your name
 * @Date: 2021-12-17 11:27:20
 * @LastEditTime: 2022-02-24 13:19:17
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \operation-management-systems\src\api\input-output-management\profit-analysis\index.js
 */
/*
 * @Description:利润分析接口
 */
import xjaxios from "@/api/axios";

export default {
  /**
   * @description: 获取设备名称列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {componyId: 1} *
   * @param {String} order 排序方式 ASC DESC 默认ASC
   * @param {String} sort 自定义排序方式 'createTime'
   * @return {Array}
   */
  // 分页查询获取列表信息
  getPageList(params) {
    return xjaxios.post("/T_ProfitAnalysis/query", params);
  },
  // getPageList(params) {
  //   return xjaxios.post("/T_ProfitAnalysis/queryList", {
  //     pageNumber: params.pageNumber,
  //     pageSize: params.pageSize,
  //     sort: "timestamp",
  //     order: "DESC",
  //     entity: {
  //       // organizationNo: sessionStorage.organizationNo
  //       startTime: params.startTime,
  //       endTime: params.endTime
  //     }
  //   });
  // },
  getfindMonthList(params) {
    return xjaxios.post("/T_ProfitAnalysis/findMonth", params)
  },
  getfinddayList(params) {
    return xjaxios.post("/T_ProfitAnalysis/findday", params);
  },
  /**
   * @description: 添加add,删除delList,修改设施edit
   * @param {Object} params *
   * @return {Object}
   */
  allmetInfo(params, met) {
    params.organizationNo = sessionStorage.organizationNo;
    return xjaxios.post(`/installation/${met}`, params);
  },
  /**
   * @description: 主键查询设施名称
   * @param {Object} params *
   * @return {Object}
   */
  seachInfo(params) {
    params.organizationNo = sessionStorage.organizationNo;
    return xjaxios.post(`/installation/queryByCondition`, params);
  }
};
